package com.itheima.mp.controller;


import com.itheima.mp.domain.po.Address;
import com.itheima.mp.service.IAddressService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author KK
 * @since 2025-03-07
 */
@RestController
@Api(tags = "地址相关接口")
@RequestMapping("/address")
public class AddressController {
    @Autowired
    private IAddressService addressService;
//    1.获取地址列表
    @ApiOperation("获取地址列表")
    @GetMapping("/list")
    public List<Address> list(){
        return addressService.list();
    }

}
